/*
 * Event.java
 *
 * Created on November 5, 2006, 5:23 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.asaga.tools;

import java.sql.ResultSet;
import java.util.Date;
import java.sql.Time;

/**
 * 
 * The Event Object
 * @author mmixon
 */
public interface Event {
    /**
     * Add Event Method.
     * Adds event to the event storage
     */
    void addEvent();
    /**
     * Remove Event Method
     * @param id finds the event by id and removes event.
     */
    void removeEvent(int id);
    //finds event by the given string.
    /**
     * Search Event Method
     * searches event by given string.
     * @param searchString the string used to find events
     */
    void searchEvent(String searchString);
   
    /**
     * Convert Time Function;
     * @param time String to be converted
     * @throws com.asaga.tools.WrongFormatException 
     * @returns converted time to Time datatype for MySQL
     */
    Time convertTime(String time) throws WrongFormatException;
     /**
     * Convert Date Function
     * @param dateTime date String tobe converted
     * @throws com.asaga.tools.WrongFormatException Throws exception if the string is of the wrong format
     * @return returns the converted date
     */
    Date convertDate(String dateTime) throws WrongFormatException;
     /**
     * Convert Gregorian Date Function
     * @param dateTime date String tobe converted
     * @return returns the converted date
     * @throws com.asaga.tools.WrongFormatException Throws exception if the string is of the wrong format
     */
    Date convertGregorianDate(Date date) throws WrongFormatException;
    /**
     * Event List Size Method
     * @return returns the size of the event list.
     */
    int eventListSize();
    /**
     * Set Temp Event Method
     * @param iterator sets a temp object of type EventItem with id of iterator.
     */
    void setTempEvent(int iterator);
    /**
     * Number of Events Method
     * @return returns the number of events
     */
    int numberOfEvents();
    /**
     * Focus on event Method
     * @param id finds the event with 'id' id and sets event 
     */
    void focusOnEvent(int id);
    /**
     * Get Events by Location Method
     * @param state finds all events in the state
     * @return a resultset of the states
     */
    ResultSet getEventsByState(String state);
}
